import service from "../index";


export const getExportData2 = (data) => {
  return service({
    method: "POST",
    url: "/apt/material/exportByLineId",
    data,
  })


}


export const getExportData = (data) => {
  return service({
    method: "POST",
    url: "/apt/material/exportByType",
    data,
  })


}


export const getExportData3 = (data) => {
  return service({
    method: "POST",
    url: "/apt/material/exportByTypeOut",
    data,
  })


}


export const getProject = (data) => {
  return service({
    method: "POST",
    url: "/apt/material/listProjs",
    data,
  })


  return new Promise((resolve, reject) => {

    resolve({
      "msg": "查询成功",
     
      "code": 200,
      "data": [
      {
        projectCode:'XXX',
       projectName:'广东项目',
    },
    {
      projectCode:'XXX2',
      projectName:'广东项目2',
   },
     
      ]
      })
  })
}


export const MBInfoData = (data) => {
  return service({
    method: "POST",
    url: "/apt/material/listByType",
    data,
  })


  return new Promise((resolve, reject) => {

    resolve({
      "msg": "查询成功",
      "total": 22160090,
      "code": 200,
      "data": [
      {
        "projCode": 4, //项目ID
        "major": "802A_F", //主项
        "descriptionEn": "what_sdasd,what_sdasd,what_sdasd,what_sdasd,what_sdasd,what_sdasd", //描述
        "descriptionZh": "showkso啊实打实大苏打实打实adsdasd", //描述
        "size1": "6", //尺寸1
        "size2": "12", //尺寸2
        "num": 2, //数量
        "unit": "个", //单位
        "encoding": "561171835351111", //编码
    },
    {
      "projCode": 5, //项目ID
      "major": "802A_F2", //主项
      "descriptionEn": "what_sdasd,what_sdasd,what_sdasd,what_sdasd,what_sdasd,what_sdasd", //描述
      "descriptionZh": "showkso啊实打实大苏打实打实adsdasd", //描述
      "size1": "61", //尺寸1
      "size2": "122", //尺寸2
      "num": 21, //数量
      "unit": "头", //单位
      "encoding": "561171835351111", //编码
  },
     
      ]
      })
  })
}


// 获取类型的图表
export const EchartType = (data) => {
  return service({
    method: "POST",
    url: "/apt/material/queryChartData",
    data,
  })


  return new Promise((resolve, reject) => {

    resolve({
      "msg": "查询成功",
     
      "code": 200,
      "data": [
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下',
          value:200,
        },
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下2',
          value:120,
        },
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下2',
          value:220,
        },
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下2',
          value:320,
        },
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下2',
          value:320,
        },
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下2',
          value:320,
        },
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下2',
          value:320,
        },
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下2',
          value:320,
        },
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下2',
          value:320,
        },
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下2',
          value:320,
        },
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下2',
          value:320,
        },
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下2',
          value:320,
        },
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下2',
          value:320,
        },
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下2',
          value:320,
        },
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下2',
          value:320,
        },
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下2',
          value:320,
        },
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下2',
          value:320,
        },
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下2',
          value:320,
        },
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下2',
          value:320,
        },
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下2',
          value:320,
        },
      ]
      })
  })
}

// 获取类型的图表
export const EchartGX = (data) => {
  return service({
    method: "POST",
    url: "/apt/material/queryChartData",
    data,
  })


  return new Promise((resolve, reject) => {

    resolve({
      "msg": "查询成功",
     
      "code": 200,
      "data": [
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下',
          value:200,
        },
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下2',
          value:120,
        },
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下2',
          value:220,
        },
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下2',
          value:320,
        },
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下2',
          value:320,
        },
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下2',
          value:320,
        },
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下2',
          value:320,
        },
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下2',
          value:320,
        },
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下2',
          value:320,
        },
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下2',
          value:320,
        },
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下2',
          value:320,
        },
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下2',
          value:320,
        },
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下2',
          value:320,
        },
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下2',
          value:320,
        },
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下2',
          value:320,
        },
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下2',
          value:320,
        },
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下2',
          value:320,
        },
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下2',
          value:320,
        },
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下2',
          value:320,
        },
        {
          name:'XXX-描述-各种y轴数值不知道能不能放下2',
          value:320,
        },
      ]
      })
  })
}


// 获取中文描述
export const getZH = (data) => {
  return service({
    method: "POST",
    url: "/apt/material/listDescCn",
    data,
  })


  return new Promise((resolve, reject) => {

    resolve({
      "msg": "查询成功",
     
      "code": 200,
      "data": [
        {
          value:'XXX-描述-各种y轴数值不知道能不能放下',
          
        },
        {
          value:'XXX-描述-各种y轴数值不知道能不能放下2',
        
        },
        {
          value:'XXX-描述-各种y轴数值不知道能不能放下22',
        
        },
        {
          value:'XXX-描述-各种y轴数值不知道能不能放下23',
        
        },
      
      ]
      })
  })
}


// 获取英文文描述
export const getEN = (data) => {

  return service({
    method: "POST",
    url: "/apt/material/listDescEn",
    data,
  })

  return new Promise((resolve, reject) => {

    resolve({
      "msg": "查询成功",
     
      "code": 200,
      "data": [
        {
          value:'XXX-描述-各种y轴数值不知道能不能放下',
          
        },
        {
          value:'XXX-描述-各种y轴数值不知道能不能放下2',
        
        },
        {
          value:'XXX-描述-各种y轴数值不知道能不能放下2',
        
        },
        {
          value:'XXX-描述-各种y轴数值不知道能不能放下2',
        
        },
      
      ]
      })
  })
}

// 获取管道等级
export const getClass = (data) => {
  return service({
    method: "POST",
    url: "/apt/material/listSpec",
    data,
  })



  return new Promise((resolve, reject) => {

    resolve({
      "msg": "查询成功",
     
      "code": 200,
      "data": [
        {
          value:'XXX-描述-各种y轴数值不知道能不能放下',
          
        },
        {
          value:'XXX-描述-各种y轴数值不知道能不能放下2',
        
        },
        {
          value:'XXX-描述-各种y轴数值不知道能不能放下2',
        
        },
        {
          value:'XXX-描述-各种y轴数值不知道能不能放下2',
        
        },
      
      ]
      })
  })
}


export const MBInfoDetailData = (data) => {
  return service({
    method: "POST",
    url: "/apt/material/detailByType",
    data,
  })


  return new Promise((resolve, reject) => {

    resolve({
      "msg": "查询成功",
      "total": 22160090,
      "code": 200,
      "data": [
      {
        "num": 2, //数量
        "unit": "个", //单位
      "bmName": "**PG-1031", //管线号
      "pipingClass": "A5B", //管道等级

      "desit": 0, //设计温度
      "opert": 0, //操作温度
      "insType": null, //绝热类型
      "paintCode": null, //涂漆代号
      "updateTime": null, //时间
      "simpleCode": "", //简写代号
      
      "psl": "" //压力管道类别
      },
      {
        "num": 21, //数量
        "unit": "个", //单位
      "bmName": "**PG-10321", //管线号
      "pipingClass": "A52B", //管道等级

      "desit": 10, //设计温度
      "opert": 20, //操作温度
      "insType": null, //绝热类型
      "paintCode": null, //涂漆代号
      "updateTime": null, //时间
      "simpleCode": "", //简写代号
      
      "psl": "" //压力管道类别
      },
      ]
      })
  })
}



export const MBInfoData2 = (data) => {
  return service({
    method: "POST",
    url: "/apt/material/listByLineId",
    data,
  })


  return new Promise((resolve, reject) => {

    resolve({
      "msg": "查询成功",
      "total": 22160090,
      "code": 200,
      "data": [
      {
        "major": "802A_F1", //主项
        "num": 2, //数量
        "unit": "个", //单位
      "bmName": "**PG-1031", //管线号
      "pipingClass": "A5B", //管道等级

      "desit": 0, //设计温度
      "opert": 0, //操作温度
      "insType": null, //绝热类型
      "paintCode": null, //涂漆代号
      "updateTime": null, //时间
      "simpleCode": "", //简写代号
      
      "psl": "" //压力管道类别
      },
     
      ]
      })
  })
}



export const MBInfoDetailData2 = (data) => {
  return service({
    method: "POST",
    url: "/apt/material/detailByLineId",
    data,
  })


  return new Promise((resolve, reject) => {

    resolve({
      "msg": "查询成功",
      "total": 22160090,
      "code": 200,
      "data": [
      {
        "projCode": 4, //项目ID
        "major": "802A_F", //主项
        "descriptionEn": "XXSDASFQWWE", //描述
        "descriptionZh": "我是描述 我是描述我哦是", //描述
        "size1": "6", //尺寸1
        "size2": "12", //尺寸2
        "num": 2, //数量
        "unit": "个", //单位
        "encoding": "561171835351111", //编码
    },
     
      ]
      })
  })
}


// 头部 主项筛选
export const selectMajorData = (data) => {
  return service({
    method: "POST",
    url: "/apt/material/listMajors",
    data,
  })


  return new Promise((resolve, reject) => {

    resolve({
      "msg": "查询成功",
      "total": 22160090,
      "code": 200,
      "data": [
      {
       
        "value": "802A_F", //主项
        "label":'802A_F'
       
    },
    {
       
      "value": "802A_F2", //主项
      "label":'802A_F2'
     
  },
  {
       
    "value": "802A_F3", //主项
    "label":'802A_F3'
   
},
     
      ]
      })
  })
}



export const selectSize1 = (data) => {
  return service({
    method: "POST",
    url: "/apt/material/listSize1",
    data,
  })


 
}


export const selectSize2 = (data) => {
  return service({
    method: "POST",
    url: "/apt/material/listSize2",
    data,
  })


 
}